function tag(TagName,BortherNumber,ChildNode,AttributeNomber,Attribute,Style,Attribute1,Style1)
        {
            this.TagName = TagName;
            this.BortherNumber = BortherNumber;
            this.ChildNode = ChildNode;
            this.AttributeNomber = AttributeNomber;
            this.Attribute = Attribute;
            this.Style = Style;
            this.Attribute1 = Attribute1;
            this.Style1 = Style1;
        }
        var tags = [
            new tag("div",0,0,1,"class","single-doctor"),
            new tag("div",0,0,1,"class","single-doctor"),
            new tag("a",0,0,2,"class","tdoctor","data-path-hover","m 180,34.57627 -180,0 L 0,0 180,0 z"),
            new tag("figure",0,3,0),
            new tag("img",2,0,1,"src",""),
            new tag("svg",1,1,1,"viewbox","0 0 180 320","preserveAspectRatio","none"),
            new tag("path",0,0,1,"d","M 180,160 0,218 0,0 180,0 z"),
            new tag("figcaption",0,2,0),
            new tag("h2",1,0,0),
            new tag("p",0,0,0),
        ];
var t = 0;
function AddNodes(FatherLocation,ChildTag,Number)
{
    alert(tags[Number].TagName + " " + Number);
    var para = document.createElement(tags[Number].TagName);
    FatherLocation.appendChild(para);
    t = Number;//记录节点的状态
    if(tags[Number].ChildNode > 0)//如果它有子节点，开始递归，为其插入子节点
    {
        Number++;
        AddNodes(para,tags[Number].ChildTag,Number);
        t = Number;
    }
    return para;
}
function ContributeDom(flag)//构造dom树
{
    if(flag == 1)
    {
        t = 0;
        var NowLocation = document.getElementById("team_members");//初始结点
        alert(  NowLocation.innerHTML);
        for(var i = 0;i < tags.length;i ++)
        {
            var TempLocation = AddNodes(NowLocation,tags[i].TagName,i);//temp是临时的父节点，也就是构造之后的返回节点
            if(tags[i].BortherNumber != 0)//如果有兄弟节点的话
            {
                var TotalBorther=tags[i].BortherNumber;//把兄弟节点的个数给一个参数
                alert(TotalBorther + " " + tags[i].TagName);
                for(var j = 0;j < TotalBorther;j++)
                {
                    i = t;
                    AddNodes(NowLocation,tags[i].TagName,i);//继续构造兄弟节点
                }
            }
          else {//如果没有兄弟节点
                i = t;
                NowLocation = TempLocation;//更新父节点，下次就继续插入
        }
    }
}
}
(function ContributeTaem()//构造团队成员
{
    function member(name,school,image)//成员对象
    {
        this.name = name;
        this.school = school;
        this.image = image;
    }
    var team = [//成员数组
        new member("陈家鹏","南京信息工程大学","images/cjp.jpg"),
        new member("韩佩恒","南京邮电大学","images/hph.jpg"),
        new member("徐荣荣","南京邮电大学","images/xrr.jpg"),
        new member("张晓铭","南京师范大学","imgages/zxm.jpg")
    ];
    for(var i = 0;i < 1;i ++)
    {
        ContributeDom(1);//状态一表示构造成员
    }
})();